package com.rqf.mr.controller;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.rqf.mr.service.IPatientService;
import com.server.web.JSONSerielizer;
import com.server.web.OutputUtil;
import com.taobao.api.internal.toplink.embedded.websocket.util.StringUtil;


/**
 * 登录相关
 * @author HelloWorld_luo
 * @date 2016年4月18日
 */
@Controller
@RequestMapping("pati")
public class PatientController {
	
	@Autowired
	private IPatientService patientService;
	
	@RequestMapping("info/{inpatiId}")
	public void login(HttpServletRequest request, 
			HttpServletResponse response,@PathVariable String inpatiId){
		if (StringUtils.isEmpty(inpatiId)) {
			
		}
		List<Map<String, Object>> list = patientService.getPatisbyinpatiid(inpatiId);
		String json = JSONSerielizer.toJson(list, null, null);
		OutputUtil.returnJsonp(request, response, json);
	} 
}
